/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package agentes09.negotiation.behaviours;

import jade.core.behaviours.OneShotBehaviour;
import jade.wrapper.AgentController;
import jade.wrapper.ControllerException;
import jade.wrapper.PlatformController;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author jmcarmona
 */
public class CrearAgenteGestor extends OneShotBehaviour {

    private String path = "agentes09.gestor.";
	@Override
	public void action() {
        PlatformController container = myAgent.getContainerController();
        AgentController agente;
        String nombre = "";
        try {
            nombre = "agente_Gestor";
			System.out.println("Creando agente gestor");
            agente = container.createNewAgent(nombre, path + "AgenteGestor", null);
            agente.start();
        } catch (ControllerException ex) {
            Logger.getLogger(CrearAgentesProductor.class.getName()).log(Level.SEVERE, null, ex);
        }
	}

}
